<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<div id="div1">
			<img src="img/1.jpg" id='img' />
		</div>
		<input type="button" name="" id="" value="开始" onclick="qiehua()" />
	</body>
	<script type="text/javascript">
		function qiehua(){
			var i=1;
			var tu=document.getElementById('img');
			setInterval(function(){
				console.log(img);
				tu.src='img/'+i+'.jpg';
				i++;
				if(i==10){
					i=1;
				}
			},1000)
		}
	</script>
</html>
